package com.cn.web.entity;

import java.sql.Date;



public class GoodsEntity {
	
	private String goodsName;
	private String goodsCode;
	private int goodsStock;
	private String goodsProperty;
	private double goodsPrice;
	private double goodsMarketPrice;
	private Date goodsIssue;
		
	@Override
	public String toString() {
		return "GoodsEntity [goodsName=" + goodsName + ", goodsCode="
				+ goodsCode + ", goodsStock=" + goodsStock + ", goodsProperty="
				+ goodsProperty + ", goodsPrice=" + goodsPrice
				+ ", goodsMarketPrice=" + goodsMarketPrice + ", goodsIssue="
				+ goodsIssue + "]";
	}
		
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((goodsCode == null) ? 0 : goodsCode.hashCode());
		result = prime * result
				+ ((goodsIssue == null) ? 0 : goodsIssue.hashCode());
		long temp;
		temp = Double.doubleToLongBits(goodsMarketPrice);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result
				+ ((goodsName == null) ? 0 : goodsName.hashCode());
		temp = Double.doubleToLongBits(goodsPrice);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result
				+ ((goodsProperty == null) ? 0 : goodsProperty.hashCode());
		result = prime * result + goodsStock;
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GoodsEntity other = (GoodsEntity) obj;
		if (goodsCode == null) {
			if (other.goodsCode != null)
				return false;
		} else if (!goodsCode.equals(other.goodsCode))
			return false;
		if (goodsIssue == null) {
			if (other.goodsIssue != null)
				return false;
		} else if (!goodsIssue.equals(other.goodsIssue))
			return false;
		if (Double.doubleToLongBits(goodsMarketPrice) != Double
				.doubleToLongBits(other.goodsMarketPrice))
			return false;
		if (goodsName == null) {
			if (other.goodsName != null)
				return false;
		} else if (!goodsName.equals(other.goodsName))
			return false;
		if (Double.doubleToLongBits(goodsPrice) != Double
				.doubleToLongBits(other.goodsPrice))
			return false;
		if (goodsProperty == null) {
			if (other.goodsProperty != null)
				return false;
		} else if (!goodsProperty.equals(other.goodsProperty))
			return false;
		if (goodsStock != other.goodsStock)
			return false;
		return true;
	}


	public String getGoodsName() {
		return goodsName;
	}
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	public String getGoodsCode() {
		return goodsCode;
	}
	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}
	public int getGoodsStock() {
		return goodsStock;
	}
	public void setGoodsStock(int goodsStock) {
		this.goodsStock = goodsStock;
	}
	public String getGoodsProperty() {
		return goodsProperty;
	}
	public void setGoodsProperty(String goodsProperty) {
		this.goodsProperty = goodsProperty;
	}
	public double getGoodsPrice() {
		return goodsPrice;
	}
	public void setGoodsPrice(double goodsPrice) {
		this.goodsPrice = goodsPrice;
	}
	public double getGoodsMarketPrice() {
		return goodsMarketPrice;
	}
	public void setGoodsMarketPrice(double goodsMarketPrice) {
		this.goodsMarketPrice = goodsMarketPrice;
	}
	public Date getGoodsIssue() {
		return goodsIssue;
	}
	public void setGoodsIssue(Date goodsIssue) {
		this.goodsIssue = goodsIssue;
	}
	
}
